home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / TCL1 / CDICTION / CSMARTBU.H < prev    next >
Text File  |  1989-09-15  |  1KB  |  37 lines

  1. /*****************************************************************************
  2.     CSmartButton - subclass of CButton with some minor enhancements. These are:
  3.     
  4.         Ñ    Can be enabled, disabled with Enable, Disable, or SetEnable
  5.         Ñ    Provides SetHilite method to call HiliteControl
  6.         Ñ    Overrides the default Activate() to invalidate instead of
  7.             redrawing the control. The standard methods handles non-rectangular
  8.             controls on non-white backgrounds poorly.
  9.             
  10.     by Dan Podwall - you may do anything you please with this code except
  11.     charge for it, with the exception of normal network download charges.
  12.  
  13. /*****************************************************************************/
  14. #define _H_CSmartButton
  15.  
  16. #include "CButton.h"
  17. #include "defs.h"
  18.  
  19. struct CSmartButton : CButton
  20. {
  21.     Boolean enabled;
  22.     
  23.     virtual void ISmartButton(Int16    CNTLid,    CView *anEnclosure,
  24.                     CBureaucrat    *aSupervisor);
  25.     
  26.     virtual void Draw( Rect *area);
  27.  
  28.     virtual void Activate( void);
  29.     virtual void Deactivate( void);
  30.     
  31.     virtual void SetHilite( Int16 hiliteVal);
  32.     
  33.     virtual void Enable( void);
  34.     virtual void Disable( void);
  35.     virtual void SetEnable( Int16 enableFlag);
  36.     
  37. };